import Request from "@/common/utils/request/index";
enum Api {
  GetCompanySetting = "/jeecgboot/posSettings/getCompanySetting",
  SetCompanySetting = "/jeecgboot/posSettings/setCompanySetting",
  GetTermsSettings = "/jeecgboot/posSettings/getTermsSettings",
  SetTermsSettings = "/jeecgboot/posSettings/setTermsSettings",
}

export const getCompanySetting = () => {
  return Request.getInstance().send({
    url: Api.GetCompanySetting,
    method: "get",
  });
};

export const setCompanySetting = (params: any) => {
  return Request.getInstance().send({
    url: Api.SetCompanySetting,
    method: "post",
    data: params,
  });
};

export const getTermsSettings = () => {
  return Request.getInstance().send({
    url: Api.GetTermsSettings,
    method: "get",
  });
};

export const setTermsSettings = (params: any) => {
  return Request.getInstance().send({
    url: Api.SetTermsSettings,
    method: "post",
    data: params,
  });
};
